<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%
    String path=request.getContextPath();
    %>
<jsp:include page="/manage/inc/header.jsp"></jsp:include>
   <jsp:include page="/manage/inc/menu.jsp"></jsp:include>
    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<%=path%>/manage/index.jsp">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="<%=path %>/manage/CarServlet?action=init">车辆管理</a><span class="crumb-step">&gt;</span><span>新增车辆</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                <form action="<%=path%>/manage/CarServlet?action=insert" method="post" id="myform" name="myform" >
                    <table class="insert-tab" width="100%">
                        <tbody>
                         <tr>
                                <th><i class="require-red">*</i>车牌号：</th>
                                <td>
                                    <input class="common-text required" id="title" name="title" size="10" value="" type="text"><span id="spantitle"></span>
                                </td>
                            </tr>
                           <!--  <tr>
                            <th width="120"><i class="require-red">*</i>是否正在使用：</th>
                            <td>
                                <select name="check" id="check" class="required">
                                    <option class="a">空闲</option>
                                    <option class="b">正在使用</option>
                                </select>
                            </td>
                        </tr> -->
                        <!--  <tr>
                                <th><i class="require-red">*</i>价钱：</th>
                                <td>
                                    <input class="common-text required" id="price" name="price" size="10" value="" type="text"><span id="spanprice"></span>
                                </td>
                            </tr> -->
                            <tr>
                                <th></th>
                                <td>
                                    <input id="submtn" class="btn btn-primary btn6 mr10" value="提交" type="button">
                                    <input class="btn btn6" id="resetbutton"  value="返回" type="button">
                                </td>
                            </tr>
                        </tbody></table>
                </form>
            </div>
        </div>

    </div>
    <!--/main-->
</div>
 <jsp:include page="/manage/inc/footer.jsp"></jsp:include>
 <script>
 $(function(){
	 $("#submtn").click(function(){
		 var title=$("#title").val();
		 /* var price=$("#price").val(); */
		 /* var patt=/[0-9]/;
		 var num=0;
		 if(patt.test(price)){
			 num++;
		 }
		 if(num==0){
			 $("#spanprice").html("输入的不是数字或者为空");
			 return false;
		 }
		 if(num==1){
			 $("#spanprice").html("");
		 } */
		 if(title.length==0){
			 $("#spantitle").html("不能为空");
			 return false;
		 }else{
			 $("#spantitle").html(" ");
		 }
		 $("#myform").submit();
	 })
	})
 </script>
 <script>
$("#resetbutton").click(function(){
	window.location.href="<%=path%>/manage/CarServlet?action=init";
})
</script>